package Test;

class Person{
    String name;
    String gender;
    int age;

    public Person(String name,String gender,int age){
        this.name = name;
        this.gender = gender;
        this.age = age;
    }

    @Override
    public String toString() {
        return "Test.Person{" +
                "name='" + name + '\'' +
                ", gender='" + gender + '\'' +
                ", age=" + age +
                '}';
    }

    static {
        System.out.println("这是静态的！");
    }

    {
        System.out.println("这是实例代码块！");
    }
}

public class Test07 {
    public static void main(String[] args) {
        Person person = new Person("zhangsan","男",18);
        System.out.println(person);
    }
}
